using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.Template
{
    public class TemplateDB
    {
        public TemplateDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(Template template)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocTemplateInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@Status", template.Status);
            _sPara.Add("@Info1", template.Info1);
            _sPara.Add("@Info2", template.Info2);
            _sPara.Add("@Info3", template.Info3);
            _sPara.Add("@Info4", template.Info4);
            _sPara.Add("@Info5", template.Info5);
            _sPara.Add("@NInfo1", template.NInfo1);
            _sPara.Add("@NInfo2", template.NInfo2);
            _sPara.Add("@FInfo1", template.FInfo1);
            _sPara.Add("@FInfo2", template.FInfo2);
            _sPara.Add("@DInfo1", template.DInfo1);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }

    }
}